from Common. function import project_path
from loguru import logger
def log():
    path=project_path()+ "Logs/"
    log_file=path+'log_{time:YYYY_MM_DD}.log'
    #移除控制台
    #logger.remove (handler_id=None)
    logger.add (log_file, rotation='200kb', compression='zip')
    return logger
if __name__== '__main__':
    print(project_path())
    log = log ()
    log.info("大牛测试 info")
    log.debug("大牛测试 debug")
    log.error("大牛测试 error")
